package net.caixiaomi.info.ui.football;


import net.caixiaomi.info.util.Constants;

/**
 * Created by mengxianzheng on 2018/3/30.
 */

public class FootballAdapterFactory {

    private FootballAdapterFactory() {
    }

    /**
     * 返回不同类型的代理对象
     *
     * @param showType
     * @param adapter
     */
    public static ItemViewProxy createItemViewProxy(int showType, FootballAdapter adapter) {

        ItemViewProxy itemViewProxy = null;

        switch (showType) {
            case Constants.TYPE_VICTORY_AND_DEFEAT:
            case Constants.TYPE_VICTORY_AND_DEFEAT_1:
                itemViewProxy = new VictoryAndDefeatProxy(adapter);
                break;
            case Constants.TYPE_ALL_GOALS:
                itemViewProxy = new AllGoalsProxy(adapter);
                break;
            case Constants.TYPE_HALF_AND_ALL:
            case Constants.TYPE_SCORE:
                itemViewProxy = new HalfAndAllProxy(adapter);
                break;
            case Constants.TYPE_2_IN_1:
                itemViewProxy = new TowInOneProxy(adapter);
                break;
            case Constants.TYPE_BLEND:
                itemViewProxy = new BlendProxy(adapter);
                break;

        }

        return itemViewProxy;
    }

}
